package com.KeyWord.toString_;

public class Case {
    public static void main(String[] args) {
        Monster monster = new Monster("小钻风",100,100);
        System.out.println(monster.hashCode());
        System.out.println(monster.toString());
    }
}

class Monster {
    private String name;
    private int health;
    private int strength;

    public Monster(String name, int health, int strength) {
        this.name = name;
        this.health = health;
        this.strength = strength;
    }

    @Override
    public String toString() {
        return "Monster{" +
                "name='" + name + '\'' +
                ", health=" + health +
                ", strength=" + strength +
                '}';
    }
}
